﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Ranji_2017_Umlite
{
    public partial class MainView : Form
    {
        // 所有的窗体
        Zongmao zongmao = new Zongmao();
        public MainView()
        {
            InitializeComponent();
        }

        private void Set_View()
        {
            SystemFunction.Set_Scale_Pos(panel_button,1,0.1,0,0);
            SystemFunction.Set_Scale_Pos(panel_View,1,0.85,0,0.11);
            SystemFunction.Set_Scale_Pos(button_zongmao,0.1,0.095,0,0);
        }

        private void MainView_Load(object sender, EventArgs e)
        {
            Set_View();
        }

        private void Set_Show_View(Form myform)
        {
            myform.TopLevel = false;
            panel_View.Controls.Clear();
            panel_View.Controls.Add(myform);
            myform.Left = 0;
            myform.Top = 0;
            myform.Width = panel_View.Width;
            myform.Height = panel_View.Height;
            myform.Show();
        }

        private void button_zongmao_Click(object sender, EventArgs e)
        {
            Set_Show_View(zongmao);
        }
    }
}
